package com.whz.enumordinal;

import lombok.extern.slf4j.Slf4j;

/**
 * @Author: sinosoft
 * @Description: 使用int枚举模式 将2的不同倍数赋予每个常量
 * @Date: Create in 20:48 2021/5/14
 * @Modified By:
 */
@Slf4j
public class Text {
    public static final int STYLE_BOLD = 1 << 0; //1
    public static final int STYLE_ITALIC = 1 << 1; // 2
    public static final int STYLE_UNDERLINE = 1 << 2; // 4
    public static final int STYLE_STRIKETHROUGH = 1 << 3; // 8

    public void applyStyles(int styles) {
        log.info("styles: {}", styles);
    }


}
